<div class="heading">
	<h3><?php echo $judul_tabel; ?></h3>                    

	<div class="resBtnSearch">
		<a href="#"><span class="icon16 icomoon-icon-search-3"></span></a>
	</div>

	<div class="search">

		<form id="searchform" action="search.html">
			<input type="text" id="tipue_search_input" class="top-search" placeholder="Search here ..." />
			<input type="submit" id="tipue_search_button" class="search-btn" value=""/>
		</form>

	</div><!-- End search -->
	
	<ul class="breadcrumb">
		<li>Anda berada disini:</li>
		<li>
			<a href="<?php echo base_url(); ?>barang" class="tip" title="Kembali ke List Barang">
				<span class="icon16 icomoon-icon-screen-2"></span>
			</a> 
			<span class="divider">
				<span class="icon16 icomoon-icon-arrow-right-2"></span>
			</span>
		</li>
		<li class="active">Tambah</li>
	</ul>

</div>
<!-- Form Pengajuan Barang-->
<div class="span6">
	   <div class="box" style="margin-top:27px;">

		   <div class="title">

			   <h4>
				   <span class="icon16 icomoon-icon-equalizer-2"></span>
				   <span>Form Data Barang</span>
			   </h4>
			   
		   </div>
		   <div class="content">
			   <form class="form-horizontal" action="<?php echo base_url(); ?>barang/save/<?php echo $mode; ?>" method="POST">
				   
				   <div class="form-row row-fluid">
					   <div class="span12">
						   <div class="row-fluid">
							   <label class="form-label span4" for="normal">Kode barang</label>
							   <input class="span8 mask" id="idbarang" name="idbarang" type="text"
									  value="<?php if(isset($barang))echo $barang["idbarang"]; ?>"
								<?php if(isset($barang))echo "readonly"; ?> />
						   </div>
					   </div> 
				   </div>

				   <div class="form-row row-fluid">
					   <div class="span12">
						   <div class="row-fluid">
							   <label class="form-label span4" for="normal">Nama Barang</label>
							   <input class="span8 mask" id="nmbarang" name="nmbarang" type="text"
									  value="<?php if(isset($barang))echo $barang["nmbarang"]; ?>"
								/>
						   </div>
					   </div>
				   </div>
                   
                   <div class="form-row row-fluid">
					   <div class="span12">
						   <div class="row-fluid">
							   <label class="form-label span4" for="normal">Part No.</label>
							   <input class="span8 mask" id="partnumber" name="partnumber" type="text"
									  value="<?php if(isset($barang))echo $barang["partnumber"]; ?>"
								/>
						   </div>
					   </div>
				   </div>
                   
                   <div class="form-row row-fluid">
					   <div class="span12">
						   <div class="row-fluid">
							   <label class="form-label span4" for="normal">Serial No.</label>
							   <input class="span8 mask" id="serialnumber" name="serialnumber" type="text"
									  value="<?php if(isset($barang))echo $barang["serialnumber"]; ?>"
								/>
						   </div>
					   </div>
				   </div>
                   
                   <div class="form-row row-fluid">
					   <div class="span12">
						   <div class="row-fluid">
							   <label class="form-label span4" for="normal">Berat</label>
							   <input class="span8 mask" id="berat" name="berat" type="text"
									  value="<?php if(isset($barang))echo $barang["berat"]; ?>"
								/>
						   </div>
					   </div>
				   </div>
				   
				   <div class="form-row row-fluid">
					   <div class="span12">
						   <div class="row-fluid">
							   <label class="form-label span4" for="checkboxes">Jenis Barang</label>
                               		<div class="span8 controls">   
                                    	<select name="kdjenis" id="kdjenis" class="nostyle" style="width:100%;">
											<?php echo $this->crud->get_combo_jenis(isset($barang)?$barang["kdjenis"]:""); ?>
										</select>
									</div>
						   </div>
					   </div>
				   </div>
				   
				   <div class="form-row row-fluid">
					   <div class="span12">
						   <div class="row-fluid">
							   <label class="form-label span4" for="checkboxes">Supplier</label>
                               		<div class="span8 controls">   
                                    	<select name="kdsupplier" id="kdsupplier" class="nostyle" style="width:100%;">
											<?php echo $this->crud->get_combo_supplier(isset($barang)?$barang["kdsupplier"]:""); ?>
										</select>
									</div>
						   </div>
					   </div>
				   </div>
				   
				   <div class="form-row row-fluid">
                   		<div class="span12">
                        	<div class="row-fluid">
                                <label class="form-label span4" for="textarea">Gambar</label>
                            	<input type="file" name="fileinput" id="file" />
                        	</div>
                    	</div>  
					</div>
				   
					<div class="form-actions">
						<button type="submit" class="btn btn-info">Simpan</button>
						<button type="button" class="btn">Batal</button>
					</div>
			   </form>
		   </div>

	   </div><!-- End .box -->

   </div><!-- End .span6 -->
	<script>
		function msgBerhasil(){
			$.pnotify({
				type: 'success',
				title: 'Simpan Data Berhasil',
				icon: 'picon icon16 iconic-icon-check-alt white',
				opacity: 0.95,
				history: false,
				sticker: false
			}); 
		}
		function msgGagal(){
			$.pnotify({
				type: 'error',
				title: 'Simpan Data Gagal!',
				icon: 'picon icon24 typ-icon-cancel white',
				opacity: 0.95,
				history: false,
				sticker: false
			}); 
		}
		$(document).ready(function(){
			<?php
			echo $this->session->flashdata('alert_form');
			?>
		});
	</script>
<!-- END Form Pengajuan Barang-->